/* el-table行合并
data:表格数据源
name:合并依赖字段 */
export const getSpanArr = (data,name) => {
    let spanArr = []
    let pos = 0
    data.map((item,index)=>{
      if(index ==0){
        spanArr.push(1)
      }else{
        if(item[name]&&item[name]===data[index-1][name]){
          spanArr[pos] += 1
          console.log(spanArr[pos],'---print---');
          spanArr.push(0)
        }else{
          spanArr.push(1)
          pos=index
        }
      }
    })
    return spanArr
  }